Program Organization Units

Within IECClosed International Electrotechnical Commission - A not-for-profit, non-governmental international standards organization that prepares and publishes International Standards for all electrical, electronic and related technologies. 61131-3, the Functions, Function Blocks, and Programs are called Program Organization Units (POUClosed Programmable Organization Unit - An application is a list of programs. Programs are executed sequentially within the target cycle according to the order defined by the user and displayed in the Project View.).

In addition to the IEC standard, you can write you own code as either a sub-program or UDFBClosed User Defined Function Block - Used as a sub-function block in another program of the application. It is described using FBD, LD, ST or IL language. Input / output parameters of a UDFB (as well as private variables) are declared in the variable editor as local variables of the UDFB..

Types

IEC 61131-3

Written by end-user

Basic functions (has no memory)

Functions

Programs / Sub-programs

Instantiated functions (keep trackClosed Characterized by an axis group that follows with its movement the movement of another axis group. of the past)

Function Blocks (FB)

User-Defined Function Blocks (UDFB)

Differences between Functions and Function Blocks

  • Functions are expected to complete in one cycle.
  • Function Blocks can take several cycles to complete.

Description of FB Operation

Rather than halt the application or waiting for operations to complete, the FB typically gives control back to the application but does not set its Done output.

Examples of Operations Overrunning the Cycle Duration

Operation Sequence

  1. When an FB is called, it starts an operation and possibly does not complete it.
  2. The FB is called in the next cycle and it checks to determine if the operation is done.
  3. If it is done, it sets the Done output.
    If not, it continues on.
  4. Now the application knows that the operation is complete and can do what ever other processing it needs based on the FB being done.